package com.echoesnet.echoesshortvideo.Activities;

import android.arch.lifecycle.ViewModelProviders;
import android.content.Intent;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.echoesnet.echoesshortvideo.AppController;
import com.echoesnet.echoesshortvideo.Beans.IncludeNavBarBean;
import com.echoesnet.echoesshortvideo.R;
import com.echoesnet.echoesshortvideo.ViewModels.FansFocusViewModel;
import com.echoesnet.echoesshortvideo.databinding.ActivityReportFoulsUserBinding;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;

public class ReportFoulsUserAct extends BaseActivity
{

    @BindView(R.id.tv_text_report)
    TextView tvTextReport;
    @BindView(R.id.iv_political)
    ImageView ivPolitical;
    @BindView(R.id.rl_all_political)
    RelativeLayout rlAllPolitical;
    @BindView(R.id.iv_disInfor)
    ImageView ivDisInfor;
    @BindView(R.id.rl_all_disInfor)
    RelativeLayout rlAllDisInfor;
    @BindView(R.id.iv_sexy)
    ImageView ivSexy;
    @BindView(R.id.rl_all_sexy)
    RelativeLayout rlAllSexy;
    @BindView(R.id.iv_harry)
    ImageView ivHarry;
    @BindView(R.id.rl_harry)
    RelativeLayout rlHarry;
    @BindView(R.id.iv_illegal)
    ImageView ivIllegal;
    @BindView(R.id.rl_all_illegal)
    RelativeLayout rlAllIllegal;
    @BindView(R.id.iv_attacks)
    ImageView ivAttacks;
    @BindView(R.id.rl_all_attacks)
    RelativeLayout rlAllAttacks;
    @BindView(R.id.rl_allinfor)
    RelativeLayout rlAllinfor;
    private FansFocusViewModel uViewModel;

    private Unbinder unbinder;
    private String uId;

    private ActivityReportFoulsUserBinding actBinding;
    private IncludeNavBarBean navBean;
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        actBinding = DataBindingUtil.setContentView(this, R.layout.activity_report_fouls_user);
        navBean = new IncludeNavBarBean("举报用户", true);
        actBinding.relNavBar.setNavBean(navBean);
        actBinding.relNavBar.itvLeft.setOnClickListener(view -> finish());


        unbinder = ButterKnife.bind(this);
        uId = getIntent().getStringExtra("uId");

        AppController.getInstance().addActivity(this);
        uViewModel = ViewModelProviders.of(this).get(FansFocusViewModel.class);

    }

    @Override
    protected void onDestroy()
    {
        super.onDestroy();
        if (unbinder != null)
            unbinder.unbind();
    }

    @OnClick({R.id.iv_political, R.id.rl_all_political, R.id.iv_disInfor, R.id.rl_all_disInfor, R.id.iv_sexy, R.id.rl_all_sexy, R.id.iv_harry, R.id.rl_harry, R.id.iv_illegal, R.id.rl_all_illegal, R.id.iv_attacks, R.id.rl_all_attacks})
    public void onClick(View view)
    {
        Intent intent = new Intent(this,ReportUserActivity.class);
        switch (view.getId())
        {
            case R.id.iv_political:
            case R.id.rl_all_political:
                intent.putExtra("reason","政治广告");
                intent.putExtra("uId",uId);
                startActivity(intent);
                break;
            case R.id.iv_disInfor:
            case R.id.rl_all_disInfor:
                intent.putExtra("reason","不实信息");
                intent.putExtra("uId",uId);
                startActivity(intent);
                break;
            case R.id.iv_sexy:
            case R.id.rl_all_sexy:
                intent.putExtra("reason","污秽色情");
                intent.putExtra("uId",uId);
                startActivity(intent);
                break;
            case R.id.iv_harry:
            case R.id.rl_harry:
                intent.putExtra("reason","广告骚扰");
                intent.putExtra("uId",uId);
                startActivity(intent);
                break;
            case R.id.iv_illegal:
            case R.id.rl_all_illegal:
                intent.putExtra("reason","违法信息");
                intent.putExtra("uId",uId);
                startActivity(intent);
                break;
            case R.id.iv_attacks:
            case R.id.rl_all_attacks:
                intent.putExtra("reason","人身攻击");
                intent.putExtra("uId",uId);
                startActivity(intent);
                break;
                default:
                    break;
        }
    }
}
